package top.zhangjianyong.tools.etf;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import top.zhangjianyong.tools.entity.ETF;

import java.time.LocalDate;
import java.util.List;

/**
 * @author ： zhangjianyong
 * @date ： 2022/12/22 4:30 PM
 */
@Data
@Slf4j
public class ETFProcess {

    private LocalDate date;
    private List<ETF> list;
    private ETFManager etfManager;
    private int day;
    private int hc;
    private int sy;


    public ETFProcess(LocalDate date, List<ETF> list, ETFManager etfManager, int day, int hc, int sy) {
        this.date = date;
        this.list = list;
        this.etfManager = etfManager;
        this.day = day;
        this.hc = hc;
        this.sy = sy;
    }

    public boolean process() {
        return list.stream().allMatch(etf -> new ETFDayProcess(etf, date, etfManager, day, hc, sy).process());
    }


}
